//package com.itheima.consumer.config;
//
//import lombok.extern.slf4j.Slf4j;
////import org.springframework.amqp.core.Queue;
////import org.springframework.amqp.core.QueueBuilder;
//import org.springframework.amqp.rabbit.annotation.Argument;
//import org.springframework.amqp.rabbit.annotation.Queue;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
////import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
///**
// * Author:Cammy.Wu
// * Date:2024-05-28
// * Description:
// */
//
//@Configuration
//@Slf4j
//public class LazyConfig {
////    @Bean
////    public Queue lazyQueue(){
////        return QueueBuilder
////                .durable("lazy.queue")
////                .lazy() // 开启Lazy模式
////                .build();
////    }
//
//    // ——————————————————————————————————————————————————————————————————————
//
//    @RabbitListener(queuesToDeclare = @Queue(
//            name = "lazy.queue",
//            durable = "true",
//            arguments = @Argument(name = "x-queue-mode", value = "lazy")
//    ))
//    public void listenLazyQueue(String msg){
//        log.info("接收到 lazy.queue的消息：{}", msg);
//    }
//}
